import MySQLdb
import datetime

conn= MySQLdb.connect(
        host='localhost',
        port = 3306,
        user='root',
        passwd='pactera',
        db ='spiderlog',
        )
cur = conn.cursor()
# sql = "insert into spider_log (create_time) values ('%s')" % datetime.datetime.now()
# print sql
# cur.execute("insert into spider_log (create_time) values ('%s')" % datetime.datetime.now())

# cur.execute("select LAST_INSERT_ID()")
# idobj = cur.fetchone()[0]


cur.execute("select * from spider_log_detail")
rs = cur.fetchall()
print rs

cur.close()
conn.commit()
conn.close()
print "DONE"